home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
pascal
/
tps.zip
/
TPS.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1992-09-06
|
1KB
|
39 lines
program tps;
{Program to load DLL containing hook function and instruct DLL to
load Turbo Pascal for Windows
(C) N.Waltham August 1992
Email 100013.3330@Compuserve.Com
}
Uses
WinProcs,WinTypes;
{Definition of the functions in the dll}
function TileInStall(aFile : pChar; aCommand : integer) : integer;external 'tpslib' index 1;
function Uninstall : integer;external 'tpslib' index 2;
var
TaskWindow : integer; {This will contain the handle of turbo pascals main window}
Msg : tMsg; {Used in message loop}
begin
{Start turbo pascal - the menu command TPW uses for tiling is 4001.}
{Other programs will use different commands. These can be looked up using
the Resource Toolkit. However some software licences prohibit reverse
engineering of the program}
TaskWindow:=TileInstall('tpw',4001);
{Continue loop until the mainwindow has been destroyed}
while IsWindow(TaskWindow) do
while PeekMessage(Msg, 0, 0, 0, pm_Remove) do
begin
if Msg.Message = WM_QUIT then Halt(Msg.wParam);
TranslateMessage(Msg);
DispatchMessage(Msg);
end;
{Instruct DLL to unhook}
UnInstall;
end.